package com.tiancheng.trade.merchant.mapper;

import com.tiancheng.trade.merchant.model.MerchantPaymentChannel;
import com.tiancheng.trade.merchant.vo.merchant.MerchantPaymentChannelVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MerchantPaymentChannelMapper extends MYBaseMapper<MerchantPaymentChannel> {

    /**
     * 批量新增商户渠道信息
     *
     * @param list
     * @return
     */
    int insertBatch(@Param("list") List<MerchantPaymentChannel> list);

    /**
     * 根据商户编码批量删除商户渠道信息
     *
     * @param list
     * @return
     */
    int updateDelBatch(@Param("list") List<String> list);

    /**
     * 按商户编号查询商户渠道信息
     *
     * @param list
     * @return
     */
    List<MerchantPaymentChannel> getChannelByMerchantCode(@Param("list") List<String> list);


    /**
     * 根据业务侧商户编号，查询商户以及支付渠道信息
     *
     * @param channelVO
     * @return
     */
    List<MerchantPaymentChannelVO> findMerchantByBusiness(@Param("vo") MerchantPaymentChannelVO channelVO);

}
